# Makefile.am
# 
# --
# Copyright (c) 2012, Christophe Huriaux
# Distributed under the terms of the MIT license.
# http://www.opensource.org/licenses/mit-license.php
# -- 

AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I aclocal

mcsoup_includes = -I$(top_builddir)/include -I$(top_srcdir)/include \
                -I$(top_builddir) -I$(top_srcdir) \
                -I$(top_srcdir)/include/network


# Mc protocol packet descriptors
noinst_LIBRARIES = libpacket.a

libpacket_a_SOURCES = src/network/packet/packets.cpp \
                src/network/packet/pfs00KeepAlive.cpp \
                src/network/packet/pfs01Login.cpp \
                src/network/packet/pfs02Handshake.cpp \
                src/network/packet/pfs03ChatMessage.cpp \
                src/network/packet/pfs04TimeUpdate.cpp \
                src/network/packet/pfs05EntityEquipment.cpp \
                src/network/packet/pfs06SpawnPosition.cpp \
                src/network/packet/pfs0DPlayerPositionAndLook.cpp \
                src/network/packet/pfs12Animation.cpp \
                src/network/packet/pfs32PreChunk.cpp \
                src/network/packet/pfs33MapChunk.cpp \
                src/network/packet/pfs82UpdateSign.cpp \
                src/network/packet/pfsFFKick.cpp \
                src/network/packet/pts00KeepAlive.cpp \
                src/network/packet/pts01Login.cpp \
                src/network/packet/pts02Handshake.cpp \
                src/network/packet/pts03ChatMessage.cpp \
                src/network/packet/pts05EntityEquipment.cpp \
                src/network/packet/pts0DPlayerPositionAndLook.cpp \
                src/network/packet/pts12Animation.cpp \
                src/network/packet/ptsFEPing.cpp
                
libpacket_a_CPPFLAGS = $(mcsoup_includes)


# Main program
bin_PROGRAMS = mcsoup

mcsoup_SOURCES =  src/mcSoup.cpp \
                src/debug/logger.cpp \
                src/thread/thread.cpp \
                src/graphics/GLCamera.cpp \
                src/graphics/GLScene.cpp \
                src/graphics/GLWindow.cpp \
                src/graphics/SDLWindow.cpp \
                src/graphics/GLTexture.cpp \
                src/graphics/GLTextureManager.cpp \
                src/graphics/GLStringFactory.cpp \
                src/graphics/SDLSurface.cpp \
                src/network/wrapper/JavaStreamWrapper.cpp \
                src/network/socket/ClientSocket.cpp \
                src/network/socket/McSocket.cpp \
                src/network/packet/McPacket.cpp \
                src/utils/GLInfo.cpp
                
                
                
mcsoup_CPPFLAGS = $(mcsoup_includes)
mcsoup_LDADD = libpacket.a

dist_noinst_SCRIPTS = autogen

# Documentation generation
if HAVE_DOXYGEN
.PHONY: doc
doc: $(top_builddir)/doc/doxygen.cfg
	cd $(top_builddir)/doc/ && doxygen doxygen.cfg
endif # HAVE_DOXYGEN
